<!-- 屈光发育档案/角塑复查(常规检查) -->
<template>
  <div>
    <el-form size="medium" :model="dataForm" :rules="dataRule" ref="dataForm" label-width="100px">
      <el-divider content-position="center">基础信息</el-divider>
      <el-row>
        <el-col :span="6">
          <el-form-item label="就诊卡号" prop="customerCard">
            <el-input v-model="dataForm.customerCard" placeholder="就诊卡号">
              <el-button slot="append" @click="readCardHandle">读卡</el-button>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="姓名" prop="name">
            <el-input v-model="personInfo.name" placeholder="姓名" disabled>
              <el-button slot="append" @click="openDialog('person')">查询</el-button>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="出生年月" prop="birthDay">
            <el-input v-model="personInfo.birthDay" placeholder="出生年月" disabled></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="民族" prop="nation">
            <el-select v-model="personInfo.nation" disabled>
              <el-option v-for="item in nationalList" :value="item.id" :label="item.name" :key="item.id"></el-option>
            </el-select>
            <!-- <el-input v-model="personInfo.nation" disabled></el-input> -->
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="性别" prop="gender">
            <el-input v-if="personInfo.gender == '0'" value="男" disabled></el-input>
            <el-input v-if="personInfo.gender == '1'" value="女" disabled></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="联系电话" prop="telPhone">
            <el-input v-model="personInfo.telPhone" placeholder="联系电话" disabled></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="家庭住址" prop="address">
            <el-input v-model="personInfo.address" placeholder="家庭住址" disabled></el-input>
          </el-form-item>
        </el-col>
        <!-- <el-col :span="6">
          <el-form-item label="戴镜类型" prop="wearType">
            <el-select v-model="personInfo.personExtProp.wearType">
              <el-option :value="1" label="框架眼镜"></el-option>
              <el-option :value="2" label="软性隐形眼镜"></el-option>
              <el-option :value="3" label="角膜塑形镜"></el-option>
              <el-option :value="4" label="不戴镜"></el-option>
            </el-select>
          </el-form-item>
        </el-col> -->
        <el-col :span="6">
          <el-form-item label="出生体重" prop="birthWeight">
            <el-input v-model="personInfo.personExtProp.birthWeight" placeholder="出生体重" disabled>
              <template slot="append"> g </template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="是否早产" prop="premature">
            <el-select v-model="personInfo.personExtProp.premature" style="width: 100px" disabled>
              <el-option :value="0" label="否"></el-option>
              <el-option :value="1" label="是"></el-option>
            </el-select>
            <el-input v-model="personInfo.personExtProp.preWeek" placeholder="早产周数" style="width: 120px" disabled></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="父亲近视史" prop="fatherMyopia">
            <el-select v-model="personInfo.personExtProp.fatherMyopia" disabled>
              <el-option value="0" label="无"></el-option>
              <el-option value="1" label="轻度"></el-option>
              <el-option value="2" label="中度"></el-option>
              <el-option value="3" label="重度"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="母亲近视史" prop="motherMyopia">
            <el-select v-model="personInfo.personExtProp.motherMyopia" disabled>
              <el-option value="0" label="无"></el-option>
              <el-option value="1" label="轻度"></el-option>
              <el-option value="2" label="中度"></el-option>
              <el-option value="3" label="重度"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="开始使用铅笔学习书写的年龄" prop="writeAge" label-width="200px">
            <el-input v-model="personInfo.personExtProp.writeAge" disabled>
              <template slot="append">
                岁
              </template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="习惯用手" prop="habitHand">
            <el-radio-group v-model="personInfo.personExtProp.habitHand" disabled>
              <el-radio label="Y">右手</el-radio>
              <el-radio label="Z">左手</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>

      </el-row>


      <el-divider content-position="center">主诉</el-divider>
      <el-row v-if="checkType == 1">
        <el-col :span="6">
          <el-form-item label="视力减退" prop="hypopsiaYear">
            <el-input v-model="dataForm.hypopsiaYear">
              <template slot="append">年</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="戴眼镜" prop="weraYear">
            <el-input v-model="dataForm.weraYear">
              <template slot="append">年</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="戴接触镜" prop="contactLensYear">
            <el-input v-model="dataForm.contactLensYear" style="width: 160px;">
              <template slot="append">年</template>
            </el-input>
            <el-radio-group v-model="dataForm.contactLensType">
              <el-radio :label="1">硬镜</el-radio>
              <el-radio :label="2">软镜</el-radio>
            </el-radio-group>
            <el-radio-group v-model="dataForm.contactLensFrequency">
              <el-radio :label="1">常戴</el-radio>
              <el-radio :label="2">偶尔戴</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="脱镜时间" prop="offTime">
            <el-date-picker v-model="dataForm.offTime" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="现镜度数(OD)" prop="currentOd">
            <el-input v-model="dataForm.currentOd"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="现镜度数(OS)" prop="currentOs">
            <el-input v-model="dataForm.currentOs"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="原镜屈光度及验配时间" prop="orgDiopterTime" label-width="150px">
            <el-date-picker v-model="dataForm.orgDiopterTime" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="眼病及眼科手术史" prop="eyeHistorySurgery" label-width="120px">
            <el-input v-model="dataForm.eyeHistorySurgery" placeholder="眼病及眼科手术史"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="药物过敏史" prop="traunaHistorySurgery">
            <el-input v-model="dataForm.traunaHistorySurgery" placeholder="药物过敏史"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="外伤手术史" prop="drugAllergy">
            <el-input v-model="dataForm.drugAllergy" placeholder="外伤手术史"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="瘢痕体质" prop="cicatricial">
            <el-radio-group v-model="dataForm.cicatricial">
              <el-radio :label="1">是</el-radio>
              <el-radio :label="0">否</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="其他全身病史" prop="otherMedical">
            <el-input v-model="dataForm.otherMedical" placeholder="其他全身病史"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="家族史" prop="familyHistory">
            <el-input v-model="dataForm.familyHistory" placeholder="家族史" @keydown.tab.native.prevent="tabKayChangeHandle('start')"></el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <el-row v-if="checkType == 2">
        <el-col :span="6">
          <el-form-item label="舒适度(OD)" prop="comfortOd" label-width="90px">
            <el-select v-model="dataForm.comfortOd" clearable>
              <el-option :value="1" label="良好"></el-option>
              <el-option :value="2" label="异物感"></el-option>
              <el-option :value="3" label="眼痛"></el-option>
              <el-option :value="4" label="分泌物增多"></el-option>
              <el-option :value="5" label="眼红"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="舒适度(OS)" prop="comfortOs" label-width="90px">
            <el-select clearable v-model="dataForm.comfortOs">
              <el-option :value="1" label="良好"></el-option>
              <el-option :value="2" label="异物感"></el-option>
              <el-option :value="3" label="眼痛"></el-option>
              <el-option :value="4" label="分泌物增多"></el-option>
              <el-option :value="5" label="眼红"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="清晰度(OD)" prop="clearOd" label-width="90px">
            <el-select clearable v-model="dataForm.clearOd">
              <el-option :value="1" label="视力良好"></el-option>
              <el-option :value="2" label="视力波动"></el-option>
              <el-option :value="3" label="视力不佳"></el-option>
              <el-option :value="4" label="虚影"></el-option>
              <el-option :value="5" label="重影"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="清晰度(OS)" prop="clearOs" label-width="90px">
            <el-select clearable v-model="dataForm.clearOs">
              <el-option :value="1" label="视力良好"></el-option>
              <el-option :value="2" label="视力波动"></el-option>
              <el-option :value="3" label="视力不佳"></el-option>
              <el-option :value="4" label="虚影"></el-option>
              <el-option :value="5" label="重影"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="戴镜方式(OD)" prop="wearOd" label-width="100px">
            <el-select clearable v-model="dataForm.wearOd">
              <el-option :value="1" label="日戴"></el-option>
              <el-option :value="2" label="夜戴"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="戴镜方式(OS)" prop="wearOs" label-width="100px">
            <el-select clearable v-model="dataForm.wearOs">
              <el-option :value="1" label="日戴"></el-option>
              <el-option :value="2" label="夜戴"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="平均每日戴镜时间H/D(OD)" prop="wearTimeOd" label-width="170px">
            <el-select clearable v-model="dataForm.wearTimeOd">
              <el-option :value="1" label="<8小时"></el-option>
              <el-option :value="2" label="8-10小时"></el-option>
              <el-option :value="3" label=">12小时"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="平均每日戴镜时间H/D(OS)" prop="wearTimeOs" label-width="170px">
            <el-select clearable v-model="dataForm.wearTimeOs">
              <el-option :value="1" label="<8小时"></el-option>
              <el-option :value="2" label="8-10小时"></el-option>
              <el-option :value="3" label=">12小时"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="护理液品牌" prop="careBrand" label-width="90px">
            <el-select clearable v-model="dataForm.careBrand">
              <el-option :value="1" label="美尼康"></el-option>
              <el-option :value="2" label="新洁"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="润眼液品牌" prop="eyeDropsBrand" label-width="90px">
            <el-select clearable v-model="dataForm.eyeDropsBrand">
              <el-option :value="1" label="海露"></el-option>
              <el-option :value="2" label="新洁"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="除蛋白方式" prop="deproteinizedMethod" label-width="90px">
            <el-select clearable v-model="dataForm.deproteinizedMethod">
              <el-option :value="1" label="美尼康AB液"></el-option>
              <el-option :value="2" label="双氧水"></el-option>
              <el-option :value="3" label="先进"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="除蛋白频率" prop="deproteinizedTimes" label-width="90px">
            <el-select clearable v-model="dataForm.deproteinizedTimes">
              <el-option :value="1" label="两周一次"></el-option>
              <el-option :value="2" label="一个月内"></el-option>
              <el-option :value="3" label="超过一个月"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="是否揉搓镜片" prop="rubGlass" label-width="100px">
            <el-select clearable v-model="dataForm.rubGlass">
              <el-option :value="1" label="是"></el-option>
              <el-option :value="0" label="否"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="镜盒更换频率" prop="boxChangeTimes" label-width="100px">
            <el-select clearable v-model="dataForm.boxChangeTimes" @keydown.tab.native.prevent="tabKayChangeHandle('start')">
              <el-option :value="1" label="一个月"></el-option>
              <el-option :value="2" label="三个月"></el-option>
              <el-option :value="3" label="半年"></el-option>
              <el-option :value="4" label="超过半年"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>


      <el-divider content-position="center">屈光检查</el-divider>
      <el-row>
        <table class="miui-table">
          <tr>
            <td class="label-bg" width="50px" rowspan="2">眼别</td>
            <td class="label-bg" colspan="3">动态屈光检测</td>
            <td class="label-bg" rowspan="2">裸眼视力</td>
            <td class="label-bg" rowspan="2">生活视力</td>
            <td class="label-bg" colspan="3">主觉验光(动态屈光)</td>
            <td class="label-bg" rowspan="2">矫正视力</td>
          </tr>
          <tr>
            <td class="label-bg">球镜</td>
            <td class="label-bg">柱镜</td>
            <td class="label-bg">轴向</td>
            <td class="label-bg">球镜</td>
            <td class="label-bg">柱镜</td>
            <td class="label-bg">轴向</td>
          </tr>
          <tr>
            <td class="label-bg">右眼</td>
            <td>
              <el-form-item prop="ballGlassOd" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.ballGlassOd" ref="start" @keydown.tab.native.prevent="tabKayChangeHandle('postGlassOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="postGlassOd" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.postGlassOd" ref="postGlassOd" @keydown.tab.native.prevent="tabKayChangeHandle('axesOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="axesOd" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.axesOd" ref="axesOd" @keydown.tab.native.prevent="tabKayChangeHandle('ballGlassOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="nakedOd" label-width="0px">
                <el-input v-model="dataForm.nakedOd" ref="nakedOd" @keydown.tab.native.prevent="tabKayChangeHandle('nakedOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="distantOd" label-width="0px">
                <el-input v-model="dataForm.distantOd" ref="distantOd" @keydown.tab.native.prevent="tabKayChangeHandle('distantOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="mainOptBallOd" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.mainOptBallOd" ref="mainOptBallOd" @keydown.tab.native.prevent="tabKayChangeHandle('mainOptPostOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="mainOptPostOd" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.mainOptPostOd" ref="mainOptPostOd" @keydown.tab.native.prevent="tabKayChangeHandle('mainOptAxesOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="mainOptAxesOd" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.mainOptAxesOd" ref="mainOptAxesOd" @keydown.tab.native.prevent="tabKayChangeHandle('cvaOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="cvaOd" label-width="0">
                <el-input v-model="dataForm.cvaOd" ref="cvaOd" @keydown.tab.native.prevent="tabKayChangeHandle('mainOptBallOs')"></el-input>
              </el-form-item>
            </td>

          </tr>
          <tr>
            <td class="label-bg">左眼</td>
            <td>
              <el-form-item prop="ballGlassOs" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.ballGlassOs" ref="ballGlassOs" @keydown.tab.native.prevent="tabKayChangeHandle('postGlassOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="postGlassOs" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.postGlassOs" ref="postGlassOs" @keydown.tab.native.prevent="tabKayChangeHandle('axesOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="axesOs" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.axesOs" ref="axesOs" @keydown.tab.native.prevent="tabKayChangeHandle('nakedOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="nakedOs" label-width="0px">
                <el-input v-model="dataForm.nakedOs" ref="nakedOs" @keydown.tab.native.prevent="tabKayChangeHandle('distantOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="distantOs" label-width="0px">
                <el-input v-model="dataForm.distantOs" ref="distantOs" @keydown.tab.native.prevent="tabKayChangeHandle('mainOptBallOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="mainOptBallOs" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.mainOptBallOs" ref="mainOptBallOs" @keydown.tab.native.prevent="tabKayChangeHandle('mainOptPostOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="mainOptPostOs" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.mainOptPostOs" ref="mainOptPostOs" @keydown.tab.native.prevent="tabKayChangeHandle('mainOptAxesOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="mainOptAxesOs" label-width="0">
                <el-input style="min-width: 60px;" v-model="dataForm.mainOptAxesOs" ref="mainOptAxesOs" @keydown.tab.native.prevent="tabKayChangeHandle('cvaOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="cvaOs" label-width="0">
                <el-input v-model="dataForm.cvaOs" ref="cvaOs"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td class="label-bg">优势眼</td>
            <td colspan="9" style="text-align: left;">
              <el-form-item prop="masterEye" label-width="0">
                <el-radio-group v-model="dataForm.masterEye" style="min-width: 160px;">
                  <el-radio :label="0">右眼</el-radio>
                  <el-radio :label="1">左眼</el-radio>
                </el-radio-group>
              </el-form-item>
            </td>
          </tr>
        </table>
      </el-row>
      <el-divider content-position="center">眼生物检查</el-divider>
      <el-row>
        <table class="miui-table">
          <tr>
            <td class="label-bg" width="50px" rowspan="2">眼别</td>
            <td class="label-bg" colspan="5">角膜地形图</td>
            <td class="label-bg" rowspan="2">眼轴</td>
            <td class="label-bg" rowspan="2">角膜厚度mm</td>
            <td class="label-bg" rowspan="2">前房深度mm</td>
            <td class="label-bg" rowspan="2">角膜直径mm</td>
            <td class="label-bg" rowspan="2">眼压mmHg</td>
            <td class="label-bg" rowspan="2">角膜内皮数</td>
            <td class="label-bg" rowspan="2">瞳孔直径</td>
            <td class="label-bg" rowspan="2">泪膜破裂时间</td>
            <td class="label-bg" rowspan="2">泪器</td>
            <td class="label-bg" rowspan="2">立体视</td>
          </tr>
          <tr>
            <td class="label-bg">KS</td>
            <td class="label-bg">KF</td>
            <td class="label-bg">mink</td>
            <td class="label-bg">平面E值</td>
            <td class="label-bg">斜面E值</td>
          </tr>
          <tr>
            <td class="label-bg">右眼</td>
            <td>
              <el-form-item prop="ksOd" label-width="0">
                <el-input v-model="dataForm.ksOd" ref="ksOd" @keydown.tab.native.prevent="tabKayChangeHandle('kfOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="kfOd" label-width="0">
                <el-input v-model="dataForm.kfOd" ref="kfOd" @keydown.tab.native.prevent="tabKayChangeHandle('minkOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="minkOd" label-width="0">
                <el-input v-model="dataForm.minkOd" ref="minkOd" @keydown.tab.native.prevent="tabKayChangeHandle('flatEOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="flatEOd" label-width="0">
                <el-input v-model="dataForm.flatEOd" ref="flatEOd" @keydown.tab.native.prevent="tabKayChangeHandle('obliqueEOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="obliqueEOd" label-width="0">
                <el-input v-model="dataForm.obliqueEOd" ref="obliqueEOd" @keydown.tab.native.prevent="tabKayChangeHandle('ksOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="eyeAxisOd" label-width="0">
                <el-input v-model="dataForm.eyeAxisOd" ref="eyeAxisOd" @keydown.tab.native.prevent="tabKayChangeHandle('eyeAxisOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="depthOd" label-width="0">
                <el-input v-model="dataForm.depthOd" ref="depthOd" @keydown.tab.native.prevent="tabKayChangeHandle('depthOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="adOd" label-width="0">
                <el-input v-model="dataForm.adOd" ref="adOd" @keydown.tab.native.prevent="tabKayChangeHandle('adOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="wtwOd" label-width="0">
                <el-input v-model="dataForm.wtwOd" ref="wtwOd" @keydown.tab.native.prevent="tabKayChangeHandle('wtwOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="iopOd" label-width="0">
                <el-input v-model="dataForm.iopOd" ref="iopOd" @keydown.tab.native.prevent="tabKayChangeHandle('iopOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="ceOd" label-width="0">
                <el-input v-model="dataForm.ceOd" ref="ceOd" @keydown.tab.native.prevent="tabKayChangeHandle('ceOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="pdOd" label-width="0">
                <el-input v-model="dataForm.pdOd" ref="pdOd" @keydown.tab.native.prevent="tabKayChangeHandle('pdOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="tearsRuptureTimeOd" label-width="0">
                <el-input v-model="dataForm.tearsRuptureTimeOd" ref="tearsRuptureTimeOd" @keydown.tab.native.prevent="tabKayChangeHandle('tearsRuptureTimeOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lacrimalApparatusOd" label-width="0px">
                <el-select clearable v-model="dataForm.lacrimalApparatusOd" ref="lacrimalApparatusOd" @keydown.tab.native.prevent="tabKayChangeHandle('lacrimalApparatusOs')">
                  <el-option value="正常" label="正常"></el-option>
                  <el-option value="泪小点阻塞" label="泪小点阻塞"></el-option>
                  <el-option value="泪囊炎" label="泪囊炎"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="stereopsisOd" label-width="0px">
                <el-input style="width: 160px;" v-model="dataForm.stereopsisOd" ref="stereopsisOd" @keydown.tab.native.prevent="tabKayChangeHandle('stereopsisOs')">
                  <template slot="append">弧秒</template>
                </el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td class="label-bg">左眼</td>
            <td>
              <el-form-item prop="ksOs" label-width="0">
                <el-input v-model="dataForm.ksOs" ref="ksOs" @keydown.tab.native.prevent="tabKayChangeHandle('kfOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="kfOs" label-width="0">
                <el-input v-model="dataForm.kfOs" ref="kfOs" @keydown.tab.native.prevent="tabKayChangeHandle('minkOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="minkOs" label-width="0">
                <el-input v-model="dataForm.minkOs" ref="minkOs" @keydown.tab.native.prevent="tabKayChangeHandle('flatEOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="flatEOs" label-width="0">
                <el-input v-model="dataForm.flatEOs" ref="flatEOs" @keydown.tab.native.prevent="tabKayChangeHandle('obliqueEOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="obliqueEOs" label-width="0">
                <el-input v-model="dataForm.obliqueEOs" ref="obliqueEOs" @keydown.tab.native.prevent="tabKayChangeHandle('eyeAxisOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="eyeAxisOs" label-width="0">
                <el-input v-model="dataForm.eyeAxisOs" ref="eyeAxisOs" @keydown.tab.native.prevent="tabKayChangeHandle('depthOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="depthOs" label-width="0">
                <el-input v-model="dataForm.depthOs" ref="depthOs" @keydown.tab.native.prevent="tabKayChangeHandle('adOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="adOs" label-width="0">
                <el-input v-model="dataForm.adOs" ref="adOs" @keydown.tab.native.prevent="tabKayChangeHandle('wtwOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="wtwOs" label-width="0">
                <el-input v-model="dataForm.wtwOs" ref="wtwOs" @keydown.tab.native.prevent="tabKayChangeHandle('iopOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="iopOs" label-width="0">
                <el-input v-model="dataForm.iopOs" ref="iopOs" @keydown.tab.native.prevent="tabKayChangeHandle('ceOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="ceOs" label-width="0">
                <el-input v-model="dataForm.ceOs" ref="ceOs" @keydown.tab.native.prevent="tabKayChangeHandle('pdOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="pdOs" label-width="0">
                <el-input v-model="dataForm.pdOs" ref="pdOs" @keydown.tab.native.prevent="tabKayChangeHandle('tearsRuptureTimeOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="tearsRuptureTimeOs" label-width="0">
                <el-input v-model="dataForm.tearsRuptureTimeOs" ref="tearsRuptureTimeOs" @keydown.tab.native.prevent="tabKayChangeHandle('lacrimalApparatusOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lacrimalApparatusOs" label-width="0px">
                <el-select clearable v-model="dataForm.lacrimalApparatusOs" ref="lacrimalApparatusOs" @keydown.tab.native.prevent="tabKayChangeHandle('stereopsisOd')">
                  <el-option value="正常" label="正常"></el-option>
                  <el-option value="泪小点阻塞" label="泪小点阻塞"></el-option>
                  <el-option value="泪囊炎" label="泪囊炎"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="stereopsisOs" label-width="0px">
                <el-input style="width: 160px;" v-model="dataForm.stereopsisOs" ref="stereopsisOs" @keydown.tab.native.prevent="tabKayChangeHandle('eyeAppearanceOd')">
                  <template slot="append">弧秒</template>
                </el-input>
              </el-form-item>
            </td>
          </tr>
        </table>
      </el-row>
      <el-divider content-position="center">眼科检查</el-divider>
      <el-row>
        <table class="miui-table">
          <tr>
            <td class="label-bg" width="50px" rowspan="2">眼别</td>
            <td class="label-bg" colspan="6">裂隙灯</td>
            <td class="label-bg" rowspan="2" width="300px">眼底检查</td>
          </tr>
          <tr>
            <td class="label-bg">眼外观</td>
            <td class="label-bg">结膜</td>
            <td class="label-bg">角膜</td>
            <td class="label-bg">前房</td>
            <td class="label-bg">瞳孔</td>
            <td class="label-bg">晶体</td>
          </tr>
          <tr>
            <td class="label-bg">右眼</td>
            <td>
              <el-form-item prop="eyeAppearanceOd" label-width="0px">
                <el-select clearable v-model="dataForm.eyeAppearanceOd" filterable allow-create default-first-option ref="eyeAppearanceOd" @keydown.tab.native.prevent="tabKayChangeHandle('eyeAppearanceOs')">
                  <el-option v-for="item in appearanceOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="conjunctivalOd" label-width="0px">
                <el-select clearable v-model="dataForm.conjunctivalOd" filterable allow-create default-first-option ref="conjunctivalOd" @keydown.tab.native.prevent="tabKayChangeHandle('conjunctivalOs')">
                  <el-option v-for="item in conjunctivaOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="corneaOd" label-width="0px">
                <el-select clearable v-model="dataForm.corneaOd" filterable allow-create default-first-option ref="corneaOd" @keydown.tab.native.prevent="tabKayChangeHandle('corneaOs')">
                  <el-option v-for="item in corneaOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="atriaOd" label-width="0px">
                <el-select clearable v-model="dataForm.atriaOd" filterable allow-create default-first-option ref="atriaOd" @keydown.tab.native.prevent="tabKayChangeHandle('atriaOs')">
                  <el-option v-for="item in atriaOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="pupilOd" label-width="0px">
                <el-select clearable v-model="dataForm.pupilOd" filterable allow-create default-first-option ref="pupilOd" @keydown.tab.native.prevent="tabKayChangeHandle('pupilOs')">
                  <el-option v-for="item in pupilOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="crystalOd" label-width="0px">
                <el-select clearable v-model="dataForm.crystalOd" filterable allow-create default-first-option ref="crystalOd" @keydown.tab.native.prevent="tabKayChangeHandle('crystalOs')">
                  <el-option v-for="item in crystalOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="fundusCheckOd" label-width="0px">
                <el-select clearable v-model="dataForm.fundusCheckOd" filterable allow-create default-first-option ref="fundusCheckOd" @keydown.tab.native.prevent="tabKayChangeHandle('fundusCheckOs')">
                  <el-option v-for="item in fundusOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td class="label-bg">左眼</td>
            <td>
              <el-form-item prop="eyeAppearanceOs" label-width="0px">
                <el-select clearable v-model="dataForm.eyeAppearanceOs" filterable allow-create default-first-option ref="eyeAppearanceOs" @keydown.tab.native.prevent="tabKayChangeHandle('conjunctivalOd')">
                  <el-option v-for="item in appearanceOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="conjunctivalOs" label-width="0px">
                <el-select clearable v-model="dataForm.conjunctivalOs" filterable allow-create default-first-option ref="conjunctivalOs" @keydown.tab.native.prevent="tabKayChangeHandle('corneaOd')">
                  <el-option v-for="item in conjunctivaOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="corneaOs" label-width="0px">
                <el-select clearable v-model="dataForm.corneaOs" filterable allow-create default-first-option ref="corneaOs" @keydown.tab.native.prevent="tabKayChangeHandle('atriaOd')">
                  <el-option v-for="item in corneaOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="atriaOs" label-width="0px">
                <el-select clearable v-model="dataForm.atriaOs" filterable allow-create default-first-option ref="atriaOs" @keydown.tab.native.prevent="tabKayChangeHandle('pupilOd')">
                  <el-option v-for="item in atriaOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="pupilOs" label-width="0px">
                <el-select clearable v-model="dataForm.pupilOs" filterable allow-create default-first-option ref="pupilOs" @keydown.tab.native.prevent="tabKayChangeHandle('crystalOd')">
                  <el-option v-for="item in pupilOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="crystalOs" label-width="0px">
                <el-select clearable v-model="dataForm.crystalOs" filterable allow-create default-first-option ref="crystalOs" @keydown.tab.native.prevent="tabKayChangeHandle('fundusCheckOd')">
                  <el-option v-for="item in crystalOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="fundusCheckOs" label-width="0px">
                <el-select clearable v-model="dataForm.fundusCheckOs" filterable allow-create default-first-option ref="fundusCheckOs">
                  <el-option v-for="item in fundusOption" :value="item.value" :label="item.label" :key="item.value"></el-option>
                </el-select>
              </el-form-item>
            </td>
          </tr>
        </table>
      </el-row>

      <el-divider content-position="center">配镜处方检查</el-divider>
      <el-row v-if="checkType == 1">
        <table class="miui-table">
          <tr>
            <td class="label-bg" width="50px">眼别</td>
            <td class="label-bg">镜片类型</td>
            <td class="label-bg">镜片品牌</td>
            <td class="label-bg">镜片设计</td>
            <td class="label-bg">镜片颜色</td>
            <td class="label-bg">AC</td>
            <td class="label-bg">降度</td>
            <td class="label-bg">直径</td>
            <td class="label-bg">环曲值</td>
            <td class="label-bg">E值</td>
          </tr>

          <tr>
            <td class="label-bg">右眼</td>
            <td>
              <el-form-item prop="lensTypeOd" label-width="0px">
                <el-select clearable v-model="dataForm.lensTypeOd" @keydown.tab.native.prevent="tabKayChangeHandle('lensTypeOs')">
                  <el-option value="角膜塑形镜" label="角膜塑形镜"></el-option>
                  <el-option value="RGP" label="RGP"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensBrandOd" label-width="0px">
                <el-select clearable v-model="dataForm.lensBrandOd" ref="lensBrandOd" @keydown.tab.native.prevent="tabKayChangeHandle('lensBrandOs')">
                  <el-option value="欧几里得" label="欧几里得"></el-option>
                  <el-option value="梦戴维" label="梦戴维"></el-option>
                  <el-option value="阿迩发" label="阿迩发"></el-option>
                  <el-option value="CRT" label="CRT"></el-option>
                  <el-option value="Dreamlite" label="Dreamlite"></el-option>
                  <el-option value="普诺瞳" label="普诺瞳"></el-option>
									<el-option value="菁视" label="菁视"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensDesignOd" label-width="0px">
                <el-select clearable v-model="dataForm.lensDesignOd" ref="lensDesignOd" @keydown.tab.native.prevent="tabKayChangeHandle('lensDesignOs')">
                  <el-option value="普通" label="普通"></el-option>
                  <el-option value="散光" label="散光"></el-option>
                  <el-option value="小直径" label="小直径"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensColorOd" label-width="0px">
                <el-select clearable v-model="dataForm.lensColorOd" ref="lensColorOd" @keydown.tab.native.prevent="tabKayChangeHandle('lensColorOs')">
                  <el-option value="无色" label="无色"></el-option>
                  <el-option value="蓝色" label="蓝色"></el-option>
                  <el-option value="绿色" label="绿色"></el-option>
                </el-select>
              </el-form-item>
            </td>

            <td>
              <el-form-item prop="diamOd1" label-width="0px">
                <el-input v-model="dataForm.acOd" ref="acOd" @keydown.tab.native.prevent="tabKayChangeHandle('acOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOd2" label-width="0px">
                <el-input v-model="dataForm.degressionOd" ref="degressionOd" @keydown.tab.native.prevent="tabKayChangeHandle('degressionOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOd3" label-width="0px">
                <el-input v-model="dataForm.diamOd" ref="diamOd" @keydown.tab.native.prevent="tabKayChangeHandle('diamOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOd4" label-width="0px">
                <el-input v-model="dataForm.loopOd" ref="loopOd" @keydown.tab.native.prevent="tabKayChangeHandle('loopOs')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOd5" label-width="0px">
                <el-input v-model="dataForm.valueEOd" ref="valueEOd" @keydown.tab.native.prevent="tabKayChangeHandle('valueEOs')"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td class="label-bg">左眼</td>
            <td>
              <el-form-item prop="lensTypeOs" label-width="0px">
                <el-select clearable v-model="dataForm.lensTypeOs" ref="lensTypeOs" @keydown.tab.native.prevent="tabKayChangeHandle('lensBrandOd')">
                  <el-option value="角膜塑形镜" label="角膜塑形镜"></el-option>
                  <el-option value="RGP" label="RGP"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensBrandOs" label-width="0px">
                <el-select clearable v-model="dataForm.lensBrandOs" ref="lensBrandOs" @keydown.tab.native.prevent="tabKayChangeHandle('lensDesignOd')">
                  <el-option value="欧几里得" label="欧几里得"></el-option>
                  <el-option value="梦戴维" label="梦戴维"></el-option>
                  <el-option value="阿迩发" label="阿迩发"></el-option>
                  <el-option value="CRT" label="CRT"></el-option>
                  <el-option value="Dreamlite" label="Dreamlite"></el-option>
                  <el-option value="普诺瞳" label="普诺瞳"></el-option>
									<el-option value="菁视" label="菁视"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensDesignOs" label-width="0px">
                <el-select clearable v-model="dataForm.lensDesignOs" ref="lensDesignOs" @keydown.tab.native.prevent="tabKayChangeHandle('lensColorOd')">
                  <el-option value="普通" label="普通"></el-option>
                  <el-option value="散光" label="散光"></el-option>
                  <el-option value="小直径" label="小直径"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensColorOs" label-width="0px">
                <el-select clearable v-model="dataForm.lensColorOs" ref="lensColorOs" @keydown.tab.native.prevent="tabKayChangeHandle('acOd')">
                  <el-option value="无色" label="无色"></el-option>
                  <el-option value="蓝色" label="蓝色"></el-option>
                  <el-option value="绿色" label="绿色"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOs1" label-width="0px">
                <el-input v-model="dataForm.acOs" ref="acOs" @keydown.tab.native.prevent="tabKayChangeHandle('degressionOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOs2" label-width="0px">
                <el-input v-model="dataForm.degressionOs" ref="degressionOs" @keydown.tab.native.prevent="tabKayChangeHandle('diamOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOs3" label-width="0px">
                <el-input v-model="dataForm.diamOs" ref="diamOs" @keydown.tab.native.prevent="tabKayChangeHandle('loopOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOs4" label-width="0px">
                <el-input v-model="dataForm.loopOs" ref="loopOs" @keydown.tab.native.prevent="tabKayChangeHandle('valueEOd')"></el-input>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="diamOs5" label-width="0px">
                <el-input v-model="dataForm.valueEOs" ref="valueEOs"></el-input>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td class="label-bg">备注</td>
            <td colspan="9">
              <el-input v-model="dataForm.memo"></el-input>
            </td>
          </tr>
        </table>
      </el-row>

      <el-row v-if="checkType == 2">
        <table class="miui-table">
          <tr>
            <td class="label-bg" width="50px" rowspan="2">眼别</td>
            <td class="label-bg" rowspan="2">镜片类型</td>
            <td class="label-bg" rowspan="2">镜片品牌</td>
            <td class="label-bg" rowspan="2">镜片设计</td>
            <td class="label-bg" rowspan="2">镜片颜色</td>
            <td class="label-bg" colspan="4">配适</td>
            <td class="label-bg" rowspan="2">污染</td>
            <td class="label-bg" rowspan="2">沉淀物</td>
            <td class="label-bg" rowspan="2">划痕</td>
            <td class="label-bg" rowspan="2">诊断建议</td>
          </tr>
          <tr>
            <td class="label-bg">中心定位</td>
            <td class="label-bg">活动度</td>
            <td class="label-bg">顺目</td>
            <td class="label-bg">荧光染色</td>
          </tr>
          <tr>
            <td class="label-bg">右眼</td>
            <td>
              <el-form-item prop="lensTypeOd" label-width="0px">
                <el-select clearable v-model="dataForm.lensTypeOd" @keydown.tab.native.prevent="tabKayChangeHandle('lensTypeOs')">
                  <el-option value="角膜塑形镜" label="角膜塑形镜"></el-option>
                  <el-option value="RGP" label="RGP"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensBrandOd" label-width="0px">
                <el-select clearable v-model="dataForm.lensBrandOd" ref="lensBrandOd" @keydown.tab.native.prevent="tabKayChangeHandle('lensBrandOs')">
                  <el-option value="欧几里得" label="欧几里得"></el-option>
                  <el-option value="梦戴维" label="梦戴维"></el-option>
                  <el-option value="阿迩发" label="阿迩发"></el-option>
                  <el-option value="CRT" label="CRT"></el-option>
                  <el-option value="Dreamlite" label="Dreamlite"></el-option>
                  <el-option value="普诺瞳" label="普诺瞳"></el-option>
									<el-option value="菁视" label="菁视"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensDesignOd" label-width="0px">
                <el-select clearable v-model="dataForm.lensDesignOd" ref="lensDesignOd" @keydown.tab.native.prevent="tabKayChangeHandle('lensDesignOs')">
                  <el-option value="普通" label="普通"></el-option>
                  <el-option value="散光" label="散光"></el-option>
                  <el-option value="小直径" label="小直径"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensColorOd" label-width="0px">
                <el-select clearable v-model="dataForm.lensColorOd" ref="lensColorOd" @keydown.tab.native.prevent="tabKayChangeHandle('lensColorOs')">
                  <el-option value="无色" label="无色"></el-option>
                  <el-option value="紫色" label="紫色"></el-option>
                  <el-option value="蓝色" label="蓝色"></el-option>
                  <el-option value="绿色" label="绿色"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="centerLocationOd" label-width="0px">
                <el-select clearable v-model="dataForm.centerLocationOd" ref="centerLocationOd" @keydown.tab.native.prevent="tabKayChangeHandle('centerLocationOs')">
                  <el-option value="居中" label="居中"></el-option>
                  <el-option value="上偏" label="上偏"></el-option>
                  <el-option value="下偏" label="下偏"></el-option>
                  <el-option value="鼻侧偏" label="鼻侧偏"></el-option>
                  <el-option value="颞侧偏" label="颞侧偏"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="activityOd" label-width="0px">
                <el-select clearable v-model="dataForm.activityOd" ref="activityOd" @keydown.tab.native.prevent="tabKayChangeHandle('activityOs')">
                  <el-option value="<1.5mm" label="<1.5mm"></el-option>
                  <el-option value="1.5mm-2.5mm" label="1.5mm-2.5mm"></el-option>
                  <el-option value=">2.5mm" label=">2.5mm"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="blinkOd" label-width="0px">
                <el-select clearable v-model="dataForm.blinkOd" ref="blinkOd" @keydown.tab.native.prevent="tabKayChangeHandle('blinkOs')">
                  <el-option value="活动" label="活动"></el-option>
                  <el-option value="不动" label="不动"></el-option>
                  <el-option value="上睑夹持" label="上睑夹持"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="fluorescenceOd" label-width="0px">
                <el-select clearable v-model="dataForm.fluorescenceOd" ref="fluorescenceOd" @keydown.tab.native.prevent="tabKayChangeHandle('fluorescenceOs')">
                  <el-option value="理想" label="理想"></el-option>
                  <el-option value="偏松" label="偏松"></el-option>
                  <el-option value="偏紧" label="偏紧"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="polluteOd" label-width="0px">
                <el-select clearable v-model="dataForm.polluteOd" ref="polluteOd" @keydown.tab.native.prevent="tabKayChangeHandle('polluteOs')">
                  <el-option value="有" label="有"></el-option>
                  <el-option value="无" label="无"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="precipitateOd" label-width="0px">
                <el-select clearable v-model="dataForm.precipitateOd" ref="precipitateOd" @keydown.tab.native.prevent="tabKayChangeHandle('precipitateOs')">
                  <el-option value="有" label="有"></el-option>
                  <el-option value="无" label="无"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="nickOd" label-width="0px">
                <el-select clearable v-model="dataForm.nickOd" ref="nickOd" @keydown.tab.native.prevent="tabKayChangeHandle('nickOs')">
                  <el-option value="无" label="无"></el-option>
                  <el-option value="轻度划痕" label="轻度划痕"></el-option>
                  <el-option value="严重划痕" label="严重划痕"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="adviceOd" label-width="0px">
                <el-select clearable v-model="dataForm.adviceOd" ref="adviceOd" @keydown.tab.native.prevent="tabKayChangeHandle('adviceOs')">
                  <el-option value="正常，继续佩戴" label="正常，继续佩戴"></el-option>
                  <el-option value="暂时停戴" label="暂时停戴"></el-option>
                  <el-option value="参数调整" label="参数调整"></el-option>
                  <el-option value="建议换片" label="建议换片"></el-option>
                  <el-option value="镜片除蛋白" label="镜片除蛋白"></el-option>
                </el-select>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td class="label-bg">左眼</td>
            <td>
              <el-form-item prop="lensTypeOs" label-width="0px">
                <el-select clearable v-model="dataForm.lensTypeOs" ref="lensTypeOs" @keydown.tab.native.prevent="tabKayChangeHandle('lensBrandOd')">
                  <el-option value="角膜塑形镜" label="角膜塑形镜"></el-option>
                  <el-option value="RGP" label="RGP"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensBrandOs" label-width="0px">
                <el-select clearable v-model="dataForm.lensBrandOs" ref="lensBrandOs" @keydown.tab.native.prevent="tabKayChangeHandle('lensDesignOd')">
                  <el-option value="欧几里得" label="欧几里得"></el-option>
                  <el-option value="梦戴维" label="梦戴维"></el-option>
                  <el-option value="阿迩发" label="阿迩发"></el-option>
                  <el-option value="CRT" label="CRT"></el-option>
                  <el-option value="Dreamlite" label="Dreamlite"></el-option>
                  <el-option value="普诺瞳" label="普诺瞳"></el-option>
									<el-option value="菁视" label="菁视"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensDesignOs" label-width="0px">
                <el-select clearable v-model="dataForm.lensDesignOs" ref="lensDesignOs" @keydown.tab.native.prevent="tabKayChangeHandle('lensColorOd')">
                  <el-option value="普通" label="普通"></el-option>
                  <el-option value="散光" label="散光"></el-option>
                  <el-option value="小直径" label="小直径"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="lensColorOs" label-width="0px">
                <el-select clearable v-model="dataForm.lensColorOs" ref="lensColorOs" @keydown.tab.native.prevent="tabKayChangeHandle('centerLocationOd')">
                  <el-option value="无色" label="无色"></el-option>
                  <el-option value="紫色" label="紫色"></el-option>
                  <el-option value="蓝色" label="蓝色"></el-option>
                  <el-option value="绿色" label="绿色"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="centerLocationOs" label-width="0px">
                <el-select clearable v-model="dataForm.centerLocationOs" ref="centerLocationOs" @keydown.tab.native.prevent="tabKayChangeHandle('activityOd')">
                  <el-option value="居中" label="居中"></el-option>
                  <el-option value="上偏" label="上偏"></el-option>
                  <el-option value="下偏" label="下偏"></el-option>
                  <el-option value="鼻侧偏" label="鼻侧偏"></el-option>
                  <el-option value="颞侧偏" label="颞侧偏"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="activityOs" label-width="0px">
                <el-select clearable v-model="dataForm.activityOs" ref="activityOs" @keydown.tab.native.prevent="tabKayChangeHandle('blinkOd')">
                  <el-option value="<1.5mm" label="<1.5mm"></el-option>
                  <el-option value="1.5mm-2.5mm" label="1.5mm-2.5mm"></el-option>
                  <el-option value=">2.5mm" label=">2.5mm"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="blinkOs" label-width="0px">
                <el-select clearable v-model="dataForm.blinkOs" ref="blinkOs" @keydown.tab.native.prevent="tabKayChangeHandle('fluorescenceOd')">
                  <el-option value="活动" label="活动"></el-option>
                  <el-option value="不动" label="不动"></el-option>
                  <el-option value="上睑夹持" label="上睑夹持"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="fluorescenceOs" label-width="0px">
                <el-select clearable v-model="dataForm.fluorescenceOs" ref="fluorescenceOs" @keydown.tab.native.prevent="tabKayChangeHandle('polluteOd')">
                  <el-option value="理想" label="理想"></el-option>
                  <el-option value="偏松" label="偏松"></el-option>
                  <el-option value="偏紧" label="偏紧"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="polluteOs" label-width="0px">
                <el-select clearable v-model="dataForm.polluteOs" ref="polluteOs" @keydown.tab.native.prevent="tabKayChangeHandle('precipitateOd')">
                  <el-option value="有" label="有"></el-option>
                  <el-option value="无" label="无"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="precipitateOs" label-width="0px">
                <el-select clearable v-model="dataForm.precipitateOs" ref="precipitateOs" @keydown.tab.native.prevent="tabKayChangeHandle('nickOd')">
                  <el-option value="有" label="有"></el-option>
                  <el-option value="无" label="无"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="nickOs" label-width="0px">
                <el-select clearable v-model="dataForm.nickOs" ref="nickOs" @keydown.tab.native.prevent="tabKayChangeHandle('adviceOd')">
                  <el-option value="无" label="无"></el-option>
                  <el-option value="轻度划痕" label="轻度划痕"></el-option>
                  <el-option value="严重划痕" label="严重划痕"></el-option>
                </el-select>
              </el-form-item>
            </td>
            <td>
              <el-form-item prop="adviceOs" label-width="0px">
                <el-select clearable v-model="dataForm.adviceOs" ref="adviceOs">
                  <el-option value="正常，继续佩戴" label="正常，继续佩戴"></el-option>
                  <el-option value="暂时停戴" label="暂时停戴"></el-option>
                  <el-option value="参数调整" label="参数调整"></el-option>
                  <el-option value="建议换片" label="建议换片"></el-option>
                  <el-option value="镜片除蛋白" label="镜片除蛋白"></el-option>
                </el-select>
              </el-form-item>
            </td>
          </tr>
          <tr>
            <td class="label-bg">备注</td>
            <td colspan="12">
              <el-input v-model="dataForm.memo"></el-input>
            </td>
          </tr>
        </table>
      </el-row>

      <el-row>
        <el-col :span="6">
          <el-form-item label="复查类型">
            <el-select clearable v-model="dataForm.reviewType">
              <el-option :value="1" label="初次"></el-option>
              <el-option :value="2" label="一周"></el-option>
              <el-option :value="3" label="一月"></el-option>
              <el-option :value="4" label="三月"></el-option>
              <el-option :value="5" label="半年"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="检查时间">
            <el-date-picker v-model="dataForm.checkDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"
              :picker-options="checkDateOptions" @change="checkDateChangeHandle"></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="预约复查时间" label-width="100px">
            <el-date-picker v-model="dataForm.nextCheckDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"
              :picker-options="pickerOptions"></el-date-picker>
          </el-form-item>
        </el-col>

      </el-row>
      <el-row>
        <el-col :span="6">
          <el-form-item label="主检医生">
            <el-select v-model="dataForm.mainDoctor" clearable filterable default-first-option @change="changeMainDoctor">
              <el-option v-for="item in doctorOptions" :value="item.id" :label="item.realName" :key="item.id"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="视光医生">
            <el-select v-model="dataForm.checkDoctor" clearable filterable default-first-option @change="changeDoctor">
              <el-option v-for="item in userOptions" :value="item.id" :label="item.realName" :key="item.id"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <!-- 弹窗，选择人员 -->
    <search-person v-if="personVisible" ref="personDialog" @refreshForm="getPersonData"></search-person>
  </div>
</template>

<script>
  import { mapGetters } from 'vuex'
  import { getNowTime } from '@/api/base/base'
  import { filterParams } from '@/util/tools'
  import * as check from './check'
  import { remote } from '@/api/admin/dict'
  import { fetchNationalList } from '@/api/admin/national'
  import { getCheckRecord } from '@/api/pvm/arcoptometry'
  import {
    getUserListByMenu,
    getUserListByJobType
  } from '@/api/admin/user'
  import {
    getCkCornealObj,
    addCkCornealObj,
    putCkCornealObj
  } from '@/api/pvm/ckcorneal'
  import {
    getPersonObj,
    fetchPersonInfoByCode
  } from '@/api/pvm/person'

  import SearchPerson from '@/components/business/person-search'

  //验证数字和小数点
  var checkNumber = (rule, value, callback) => {
    let weightReg = /^((\d*\.\d{0,2})|(\d*)|(-\d*)|(-\d*\.\d{0,2}))$/
    if (!weightReg.test(value)) {
      callback(new Error('请输入数字类型,可包含两位小数参数'))
    } else {
      callback()
    }
  }


  var checkVision = (rule, value, callback) => {
    if (value < 0 || value > 2) {
      callback(new Error('最小值为0，最大值为2'))
    } else {
      callback()
    }
  }


  export default {
    data() {
      return {
        visible: false,
        schoolVisible: false,
        gradeVisible: false,
        classVisible: false,
        personVisible: false,
        checkDateOptions: {
          disabledDate(time) {
            return time.getTime() > Date.now();
          },
        },
        pickerOptions: {
          disabledDate(time) {
            return time.getTime() <= Date.now();
          },
        },
        appearanceOption: [],
        conjunctivaOption: [],
        corneaOption: [],
        atriaOption: [],
        pupilOption: [],
        crystalOption: [],
        fundusOption: [],

        userOptions: [],
        doctorOptions: [],
        nationalList: [],
        checkType: '',
        personInfo: {
          cardNumber: '',
          checkUsername: '',
          birthDay: '',
          certificateNum: '',
          gender: '',
          telPhone: '',
          address: '',
          personExtProp: {
            fatherMyopia: '',
            motherMyopia: '',
            habitHand: '',
            birthWeight: '',
            premature: '',
            preWeek: '',
            wareType: '',
          },
        },
        dataForm: {
          customerCard: '',
          personInfo: {},
          id: 0,
          docId: '',
          serialNumber: '',
          cardNumber: '',
          customerName: '',
          checkDate: '',
          nextCheckDate: '',
          checkType: '',
          reviewType: '',
          checkDoctorId: '',
          checkDoctorName: '',
          personId: '',
          fatherMyopiaInfo: '',
          motherMyopiaInfo: '',
          height: '',
          weight: '',
          hypopsiaYear: '',
          weraYear: '',
          contactLensYear: '',
          contactLensType: '',
          contactLensFrequency: '',
          offTime: '',
          currentOd: '',
          currentOs: '',
          orgDiopterTime: '',
          eyeHistorySurgery: '',
          traunaHistorySurgery: '',
          drugAllergy: '',
          cicatricial: '',
          otherMedical: '',
          familyHistory: '',
          comfortOd: '',
          comfortOs: '',
          wearOd: '',
          wearOs: '',
          clearOd: '',
          clearOs: '',
          wearTimeOd: '',
          wearTimeOs: '',
          careBrand: '',
          eyeDropsBrand: '',
          deproteinizedMethod: '',
          deproteinizedTimes: '',
          rubGlass: '',
          boxChangeTimes: '',
          ballGlassOd: '',
          ballGlassOs: '',
          postGlassOd: '',
          postGlassOs: '',
          axesOd: '',
          axesOs: '',
          nakedOd: '',
          nakedOs: '',
          distantOd: '',
          distantOs: '',
          mainOptBallOd: '',
          mainOptBallOs: '',
          mainOptPostOd: '',
          mainOptPostOs: '',
          mainOptAxesOd: '',
          mainOptAxesOs: '',
          cvaOd: '',
          cvaOs: '',
          masterEye: '',
          ksOd: '',
          ksOs: '',
          kfOd: '',
          kfOs: '',
          minkOd: '',
          minkOs: '',
          obliqueEOd: '',
          obliqueEOs: '',
          flatEOd: '',
          flatEOs: '',
          iopOd: '',
          iopOs: '',
          pdOd: '',
          pdOs: '',
          wtwOd: '',
          wtwOs: '',
          depthOd: '',
          depthOs: '',
          adOd: '',
          adOs: '',
          ceOd: '',
          ceOs: '',
          eyeAxisOd: '',
          eyeAxisOs: '',
          tearsRuptureTimeOd: '',
          tearsRuptureTimeOs: '',
          lacrimalApparatusOd: '',
          lacrimalApparatusOs: '',
          stereopsisOd: '',
          stereopsisOs: '',
          eyeAppearanceOd: '',
          eyeAppearanceOs: '',
          conjunctivalOd: '',
          conjunctivalOs: '',
          corneaOd: '',
          corneaOs: '',
          atriaOd: '',
          atriaOs: '',
          pupilOd: '',
          pupilOs: '',
          crystalOd: '',
          crystalOs: '',
          fundusCheckOd: '',
          fundusCheckOs: '',
          lensTypeOd: '',
          lensTypeOs: '',
          lensBrandOd: '',
          lensBrandOs: '',
          lensDesignOd: '',
          lensDesignOs: '',
          lensColorOd: '',
          lensColorOs: '',
          acOd: '',
          acOs: '',
          degressionOd: '',
          degressionOs: '',
          diamOd: '',
          diamOs: '',
          loopOd: '',
          loopOs: '',
          valueEOd: '',
          valueEOs: '',
          centerLocationOd: '',
          centerLocationOs: '',
          activityOd: '',
          activityOs: '',
          blinkOd: '',
          blinkOs: '',
          fluorescenceOd: '',
          fluorescenceOs: '',
          polluteOd: '',
          polluteOs: '',
          precipitateOd: '',
          precipitateOs: '',
          nickOd: '',
          nickOs: '',
          adviceOd: '',
          adviceOs: '',
          memo: '',
          createTime: '',
          updateTime: '',
          createUser: '',
          updateUser: '',
          tenantId: '',
          orgId: '',
          unitId: '',
          delFlag: ''
        },
        dataRule: {
          hypopsiaYear: [{
            required: false,
            validator: this.isInteger,
            trigger: 'change'
          }],
          weraYear: [{
            required: false,
            validator: this.isInteger,
            trigger: 'change'
          }],
          contactLensYear: [{
            required: false,
            validator: this.isInteger,
            trigger: 'change'
          }],
          ballGlassOd: [{
            required: true,
            message: '右眼球镜不能为空',
            trigger: 'blur'
          }, {
            validator: check.checkBallGlass,
            trigger: 'blur'
          }],
          ballGlassOs: [{
            required: true,
            message: '左眼球镜不能为空',
            trigger: 'blur'
          }, {
            validator: check.checkBallGlass,
            trigger: 'blur'
          }],
          postGlassOd: [{
            required: false,
            validator: check.checkPostGlass,
            trigger: 'blur'
          }],
          postGlassOs: [{
            required: false,
            validator: check.checkPostGlass,
            trigger: 'blur'
          }],
          axesOd: [{
            required: false,
            validator: check.checkAxes,
            trigger: 'blur'
          }],
          axesOs: [{
            required: false,
            validator: check.checkAxes,
            trigger: 'blur'
          }],
          nakedOd: [{
            required: true,
            message: '右裸眼远视力不能为空',
            trigger: 'blur'
          }, {
            validator: check.checkNaked,
            trigger: 'blur'
          }],
          nakedOs: [{
            required: true,
            message: '左裸眼远视力不能为空',
            trigger: 'blur'
          }, {
            validator: check.checkNaked,
            trigger: 'blur'
          }],
          distantOd: [{
            required: true,
            message: '右眼生活远视力不能为空',
            trigger: 'blur'
          }, {
            validator: check.checkDistant,
            trigger: 'blur'
          }],
          distantOs: [{
            required: true,
            message: '左眼生活远视力不能为空',
            trigger: 'blur'
          }, {
            validator: check.checkDistant,
            trigger: 'blur'
          }],
          mainOptBallOd: [{
            required: false,
            validator: check.checkBallGlass,
            trigger: 'blur'
          }],
          mainOptBallOs: [{
            required: false,
            validator: check.checkBallGlass,
            trigger: 'blur'
          }],
          mainOptPostOd: [{
            required: false,
            validator: check.checkPostGlass,
            trigger: 'blur'
          }],
          mainOptPostOs: [{
            required: false,
            validator: check.checkPostGlass,
            trigger: 'blur'
          }],
          mainOptAxesOd: [{
            required: false,
            validator: check.checkAxes,
            trigger: 'blur'
          }],
          mainOptAxesOs: [{
            required: false,
            validator: check.checkAxes,
            trigger: 'blur'
          }],
          cvaOd: [{
            required: false,
            validator: check.checkCva,
            trigger: 'blur'
          }],
          cvaOs: [{
            required: false,
            validator: check.checkCva,
            trigger: 'blur'
          }],
          ksOd: [{
            required: false,
            validator: check.checkKs,
            trigger: 'blur'
          }],
          ksOs: [{
            required: false,
            validator: check.checkKs,
            trigger: 'blur'
          }],
          kfOd: [{
            required: false,
            validator: check.checkKf,
            trigger: 'blur'
          }],
          kfOs: [{
            required: false,
            validator: check.checkKf,
            trigger: 'blur'
          }],
          minkOd: [{
            required: false,
            validator: check.checkMink,
            trigger: 'blur'
          }],
          minkOs: [{
            required: false,
            validator: check.checkMink,
            trigger: 'blur'
          }],
          flatEOd: [{
            required: false,
            validator: check.checkE,
            trigger: 'blur'
          }],
          flatEOs: [{
            required: false,
            validator: check.checkE,
            trigger: 'blur'
          }],
          obliqueEOd: [{
            required: false,
            validator: check.checkE,
            trigger: 'blur'
          }],
          obliqueEOs: [{
            required: false,
            validator: check.checkE,
            trigger: 'blur'
          }],
          iopOd: [{
            required: false,
            validator: check.checkIop,
            trigger: 'blur'
          }],
          iopOs: [{
            required: false,
            validator: check.checkIop,
            trigger: 'blur'
          }],
          pdOd: [{
            required: false,
            validator: check.checkPd,
            trigger: 'blur'
          }],
          pdOs: [{
            required: false,
            validator: check.checkPd,
            trigger: 'blur'
          }],
          wtwOd: [{
            required: false,
            validator: check.checkWtw,
            trigger: 'blur'
          }],
          wtwOs: [{
            required: false,
            validator: check.checkWtw,
            trigger: 'blur'
          }],
          depthOd: [{
            required: false,
            validator: check.checkDepth,
            trigger: 'blur'
          }],
          depthOs: [{
            required: false,
            validator: check.checkDepth,
            trigger: 'blur'
          }],
          adOd: [{
            required: false,
            validator: check.checkAd,
            trigger: 'blur'
          }],
          adOs: [{
            required: false,
            validator: check.checkAd,
            trigger: 'blur'
          }],
          ceOd: [{
            required: false,
            validator: check.checkCe,
            trigger: 'blur'
          }],
          ceOs: [{
            required: false,
            validator: check.checkCe,
            trigger: 'blur'
          }],
          eyeAxisOd: [{
            required: false,
            validator: check.checkEyeAxis,
            trigger: 'blur'
          }],
          eyeAxisOs: [{
            required: false,
            validator: check.checkEyeAxis,
            trigger: 'blur'
          }],
          tearsRuptureTimeOd: [{
            required: false,
            validator: check.checkTearsRuptureTime,
            trigger: 'blur'
          }],
          tearsRuptureTimeOs: [{
            required: false,
            validator: check.checkTearsRuptureTime,
            trigger: 'blur'
          }],
          stereopsisOd: [{
            required: false,
            validator: check.checkStereopsis,
            trigger: 'blur'
          }],
          stereopsisOs: [{
            required: false,
            validator: check.checkStereopsis,
            trigger: 'blur'
          }],

          serialNumber: [{
            required: true,
            message: '体检编号不能为空',
            trigger: 'blur'
          }],
          cardNumber: [{
            required: true,
            message: '就诊卡号不能为空',
            trigger: 'blur'
          }],
          customerName: [{
            required: true,
            message: '患者姓名不能为空',
            trigger: 'blur'
          }],
          checkDate: [{
            required: true,
            message: '检查日期不能为空',
            trigger: 'blur'
          }],
          nextCheckDate: [{
            required: true,
            message: '预约复查时间不能为空',
            trigger: 'blur'
          }],
          reviewType: [{
            required: true,
            message: '复查类型不能为空',
            trigger: 'blur'
          }]
        }
      }
    },
    computed: {
      ...mapGetters(['bizData', 'userInfo'])
    },
    components: {
      SearchPerson
    },
    methods: {
      // 获取当前时间
      async getNowDateStr() {
        let nowDateStr = ''
        await getNowTime().then(response => {
          nowDateStr = response.data.data
        }).catch(() => {
          this.fullscreenLoading = false
        })
        return nowDateStr
      },
      // 设置默认值
      setDefaults(){
        Object.keys(this.dataForm).forEach(key => {this.dataForm[key] = ''})
        setTimeout(() => {
          // 主诉
          if(this.checkType == 2){
            this.$set(this.dataForm,'comfortOd', 1)
            this.$set(this.dataForm,'comfortOs', 1)
            this.$set(this.dataForm,'clearOd', 1)
            this.$set(this.dataForm,'clearOs', 1)
            this.$set(this.dataForm,'wearOd', 2)
            this.$set(this.dataForm,'wearOs', 2)
            this.$set(this.dataForm,'wearTimeOd', 2)
            this.$set(this.dataForm,'wearTimeOs', 2)
          }
          // 眼底检查
          this.$set(this.dataForm,'eyeAppearanceOd', '正常')
          this.$set(this.dataForm,'eyeAppearanceOs', '正常')
          this.$set(this.dataForm,'conjunctivalOd', '正常')
          this.$set(this.dataForm,'conjunctivalOs', '正常')
          this.$set(this.dataForm,'corneaOd', '正常')
          this.$set(this.dataForm,'corneaOs', '正常')
          this.$set(this.dataForm,'atriaOd', '正常')
          this.$set(this.dataForm,'atriaOs', '正常')
          this.$set(this.dataForm,'pupilOd', '对光反应灵敏')
          this.$set(this.dataForm,'pupilOs', '对光反应灵敏')
          this.$set(this.dataForm,'crystalOd', '正常')
          this.$set(this.dataForm,'crystalOs', '正常')
        },500)
      },
      init(id, checkType, docId, customerId) {
        // for (let key in this.dataForm) {
        //   this.$set(this.dataForm,key,'')
        // }

        //
        for (let key in this.personInfo) {
          if (key == 'personExtProp') {
            this.personInfo.personExtProp = {
              fatherMyopia: '',
              motherMyopia: '',
              habitHand: ''
            }
          } else {
            this.personInfo[key] = ''
          }
        }
        this.docId = docId || ''
        this.checkType = checkType
        this.setDefaults()
        this.dataForm.id = id || ''
        this.dataForm.checkType = this.checkType

        this.getDoctorList()
        this.getUsersList()
        this.getNationalList()

        this.visible = true
        this.$nextTick(() => {
          remote('eye_appearance').then(response => {
            this.appearanceOption = response.data.data
          })
          remote('conjunctiva').then(response => {
            this.conjunctivaOption = response.data.data
          })
          remote('cornea').then(response => {
            this.corneaOption = response.data.data
          })
          remote('atria').then(response => {
            this.atriaOption = response.data.data
          })
          remote('pupil').then(response => {
            this.pupilOption = response.data.data
          })
          remote('crystal').then(response => {
            this.crystalOption = response.data.data
          })
          remote('fundus').then(response => {
            this.fundusOption = response.data.data
          })

          this.$refs['dataForm'].resetFields()
          this.$set(this.dataForm, 'checkDoctor', this.userInfo.id)
          this.getNowDateStr().then(result => {
            let resultStr = result.substring(0,10)
            this.$set(this.dataForm,'checkDate',resultStr)
            if (customerId) {
              getPersonObj(customerId).then(response => {
                if(response.data.code == '0'){
                  this.personInfo = response.data.data
                  this.dataForm.personInfo = response.data.data
                }else{
                  this.$message.error(response.data.msg)
                }
              })
            } else {
              if (this.dataForm.id) {
                getCkCornealObj(this.dataForm.id).then(response => {
                  if(response.data.code == '0'){
                    this.dataForm = response.data.data.ckCorneal
                    this.dataForm.checkType = this.checkType
                    this.dataForm.checkDoctor = this.dataForm.checkDoctorId
                    this.$emit('refreshData',this.dataForm.images)
                    getPersonObj(this.dataForm.personId).then(res => {
                      if(res.data.code == '0'){
                        this.personInfo = res.data.data
                        this.dataForm.personInfo = res.data.data
                      }else{
                        this.$message.error(res.data.msg)
                      }
                    })
                  }else{
                    this.$message.error(response.data.msg)
                  }

                })
              }
            }
          }).catch(() => {
            this.$message.warning('获取当前日期失败')
          })
        })
      },
      // 读卡
      readCardHandle(code) {
        if (code) {
          fetchPersonInfoByCode(this.dataForm.customerCard).then(response => {
            if(response.data.code == '0'){
              this.personInfo = response.data.data || {}
              this.personInfo.personExtProp = this.personInfo.personExtProp || {}
              this.checkHistory(this.personInfo.cardNum,this.personInfo.uniqueCode,this.dataForm.checkDate)
            }else{
              this.$message.error(response.data.msg)
            }
          })
        } else {
          this.$message.warning('请填写卡号')
        }
      },
      openDialog(type) {
        if (type == 'person') {
          this.personVisible = true
          this.$nextTick(() => {
            this.$refs.personDialog.init()
          })
        }
      },
      getPersonData(val) {
        getPersonObj(val.id).then(response => {
          if(response.data.code == '0'){
            let responseData = response.data.data
            this.personInfo = response.data.data
            this.dataForm = {}
            this.dataForm.docId = this.docId
            this.dataForm.checkType = this.checkType
          }else{
            this.$message.error(response.data.msg)
          }

        })
      },
      //  根据key值获取url
      getPathByKey(key) {
        let obj = {}
        obj = this.bizData.personTypeData.find(item => {
          if (item.key == key) {
            return item
          }
        })
        if (obj) {
          return obj.value
        }
      },
      //  获取验光师列表
      getUsersList() { // key = '1'
        let path = this.getPathByKey('1')
        getUserListByMenu({menuUrl: path}).then(response => {
          if(response.data.code == '0'){
            this.userOptions = response.data.data
          }else{
            this.$message.error(response.data.msg)
          }
        })
      },
      changeDoctor(val) {
        let obj = {}
        obj = this.userOptions.find(item => {
          return item.id == val
        })
        this.dataForm.checkDoctorName = obj.realName
      },
      // 获取主检医生列表
      getDoctorList() {
        getUserListByJobType(7).then(response => {
          if(response.data.code == '0'){
            this.doctorOptions = response.data.data
          }else{
            this.$message.error(response.data.msg)
          }
        })
      },
      // 获取主检医生名称
      changeMainDoctor(val) {
        let obj = {}
        obj = this.doctorOptions.find(item => {
          return item.id == val
        })
        this.$set(this.dataForm, 'mainDoctor', val)
        this.$set(this.dataForm, 'mainDoctorName', obj.realName)
        this.dataForm = {...this.dataForm}
      },
      // 获取民族列表
      getNationalList() {
        fetchNationalList({
          current: 1,
          size: 100
        }).then(response => {
          if(response.data.code == '0'){
            this.nationalList = response.data.data.records
          }else{
            this.$message.error(response.data.msg)
          }
        })
      },
      // tab键切换输入框
      tabKayChangeHandle(val) {
        setTimeout(() => {
          this.$refs[val].focus()
        }, 0)
      },
      checkDateChangeHandle(val){
        this.checkHistory(this.dataForm.customerCard,this.personInfo.uniqueCode,val)
        this.$emit('dateChange',val)
      },
      // 进入页面&修改日期时查询当天的检查记录
      checkHistory(cardNum,uniqueCode,checkDate){
        let params = {
          cardNum: cardNum || '',
          uniqueCode: uniqueCode,
          checkDate: checkDate
        }
        let that = this
        if(checkDate){
          getCheckRecord(params).then(response => {
            if(response.data.code == '0'){
              let responseData = response.data.data
              if(responseData){
                // 角膜直径 wtwOd
                this.$set(this.dataForm,'wtwOd',responseData.wtwOd)
                this.$set(this.dataForm,'wtwOs',responseData.wtwOs)
                // 角膜厚度 depthOd
                this.$set(this.dataForm,'depthOd',responseData.depthOd)
                this.$set(this.dataForm,'depthOs',responseData.depthOs)
                // 前房深度 adOd
                this.$set(this.dataForm,'adOd',responseData.adOd)
                this.$set(this.dataForm,'adOs',responseData.adOs)
                // 眼轴 alOd
                this.$set(this.dataForm,'eyeAxisOd',responseData.alOd)
                this.$set(this.dataForm,'eyeAxisOs',responseData.alOs)

                // 影像图片
                this.$emit('refreshData',responseData.images)
              }
            }else{
              this.$message.error(response.data.msg)
            }
          })
        }
      },
      changeHandle(event){}
    }
  }
</script>

<style lang="scss" scoped>
  .bg-row {
    // background-color: #cadee8;
    padding-left: 15px;
    padding-top: 5px;
  }

  .miui-table {
    width: 100%;
    margin: 10px 0;

    tr th,
    tr td {
      padding: 3px 2px;
      border: solid 1px #fff;
      text-align: center;
    }

    .miui-table-header td {
      text-align: center;
    }
  }
</style>
